package com.java3_1;

//使用继承的方式
public class MyThread extends Thread {
    public MyThread() {

    }

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i = 0; i <= 10; i++) {
            System.out.print(i + " ");
        }
        System.out.println("   " + Thread.currentThread().getName() + "已经完成任务");
    }
}
